﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo lang('system_author');?></title>
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('css/admin_style.css')?>" />
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('css/skins/tpphp.css')?>" />
<script src="<?php echo brd_url('js/main.js')?>"></script>
<script src="<?php echo brd_url('js/artDialog.js')?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo brd_url('css/admin_style.css')?>" />
<script src="<?php echo brd_url('js/jquery-1.4.4.min.js')?>"></script>

<script>
function openMsgWindow() {
	art.dialog({
		id:'msgDialog',
		title: '提示信息',
		lock:false,
		fixed:true,
		width:300,
		height:100,
		ok: function(){
			this.title('成功提示！').content('操作成功！').time(2);
			return false;
		 },
		 cancel: function(){
			return true;
		 },
		content: "<div style='line-height:25px'>您有新的站内信<Br><a href=\"http://www.uimaker.com\">点此阅读</a></div>"
	});
}
</script>
</head>
<!--加载头部-->
<?php echo $this->common->submenu();?>
<!--加载左侧-->
<?php echo $this->common->leftmenu();?>
<div class="right">
	<div class="sysconf-tab" style="margin-top:10px;">
		<ul>
			<?php if ($tpl == 'config_web'):?>
			<li style="background-color:#488BCB;"><a href="<?=site_aurl('sys_set/sys_config')?>" style="color:#FFF;">站点配置</a></li>
			<li ><a href="<?=site_aurl('sys_set/sysconf_mail')?>">邮箱配置</a></li>
			<li ><a href="<?=site_aurl('sys_set/send_mail')?>">发送邮件</a></li>
			<?php elseif ($tpl == 'config_mail'):?>
			<li ><a href="<?=site_aurl('sys_set/sys_config')?>">站点配置</a></li>
			<li style="background-color:#488BCB;"><a href="<?=site_aurl('sys_set/sysconf_mail')?>" style="color:#FFF;">邮箱配置</a></li>
			<li ><a href="<?=site_aurl('sys_set/send_mail')?>">发送邮件</a></li>
			<?php elseif ($tpl == 'send_mail'):?>
			<li ><a href="<?=site_aurl('sys_set/sys_config')?>">站点配置</a></li>
			<li ><a href="<?=site_aurl('sys_set/sysconf_mail')?>">邮箱配置</a></li>
			<li style="background-color:#488BCB;"><a href="<?=site_aurl('sys_set/send_mail')?>" style="color:#FFF;">发送邮件</a></li>
			<?php endif; ?>
		</ul>
	</div>
	<div class="body" >
		<?php if ($tpl == 'config_web'): ?>
			<form method="POST" action="" name="webset" id="webset">
				<table class="sysconf-txt table">
					<?php foreach ($data as $k=>$val){?>
						<tr>
							<td class="config-title"><?php echo $val['coTitle'];?></td>
							<td class="config-inp"><input type="text" name="config[<?php echo $val['coKey'];?>]" value="<?php echo $val['coValue'];?>"><?php echo $val['coKey'];?></td>
						</tr>
					<?php } ?>
						<tr>
							<td class="config-title"></td>
							<td class="config-but"><input type="hidden" name='syssave' value="syssave"><input type="submit" value="保存"></td>
						</tr>
				</table>
			</form>
		<?php elseif ($tpl == 'config_mail'): ?>
			<form method="POST" action="" name="mailset" id="mailset">
				<table class="sysconf-txt table">
					<?php foreach ($data as $k=>$val){?>
						<?php if ($k == '0'): ?>
						<tr>
							<td class="config-title"><?php echo lang('config_mail_type');?></td>
							<td class="mail-radio">
								<?php echo lang('config_smtp');?>&nbsp;&nbsp;<input type="radio" name="mail[mail_type]" value="smtp" <?php if(!isset($val['coValue'])||$val['coValue']=='smtp'){echo 'checked';} ?>>
								<?php echo lang('config_sendmail');?>&nbsp;&nbsp;<input type="radio" name="mail[mail_type]" value="sendmail" <?php if(!isset($val['coValue'])||$val['coValue']=='sendmail'){echo 'checked';} ?>>
							</td>
						</tr>
						<?php else: ?>
						<tr>
							<td class="config-title"><?php echo $val['coTitle'];?></td>
							<td class="config-inp"><input type="text" name="mail[<?php echo $val['coKey'];?>]" value="<?php echo $val['coValue'];?>"><?php echo $val['coKey'];?></td>
						</tr>
						<?php endif; ?>
					<?php } ?>
						<tr>
							<td class="config-title"></td>
							<td class="config-but">
								<input type="hidden" name='mailsave' value="mailsave"><input type="submit" value="保存">
							</td>
						</tr>
				</table>
			</form>
		<?php elseif ($tpl == 'send_mail'): ?>
			<form method="POST" action="" name="webset" id="webset">
				<table class="sysconf-txt table">
						<?php foreach ($data as $k=>$val){?>
						<?php if ($k == '0'): ?>
						<tr>
							<td class="config-title"><?php echo lang('config_mail_type');?></td>
							<td class="mail-radio">
								<?php echo lang('config_smtp');?>&nbsp;&nbsp;<input type="radio" name="mail[mail_type]" value="smtp" <?php if(!isset($val['coValue'])||$val['coValue']=='smtp'){echo 'checked';} ?>>
								<?php echo lang('config_sendmail');?>&nbsp;&nbsp;<input type="radio" name="mail[mail_type]" value="sendmail" <?php if(!isset($val['coValue'])||$val['coValue']=='sendmail'){echo 'checked';} ?>>
							</td>
						</tr>
						<?php else: ?>
						<tr>
							<td class="config-title"><?php echo $val['coTitle'];?></td>
							<td class="config-inp"><input type="text" name="mail[<?php echo $val['coKey'];?>]" value="<?php echo $val['coValue'];?>"><?php echo $val['coKey'];?></td>
						</tr>
						<?php endif; ?>
						<?php } ?>
						<tr>
							<td class="config-title"></td>
							<td class="config-but"><input type="hidden" name='sendmail' value="sendmail"><input type="submit" value="测试发送"></td>
						</tr>
				</table>
			</form>
		<?php endif; ?>
	</div>
</div>
</html>